]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Use StSettings instead of GtkSettings
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 27 Nov 2018 13:59:09 +0000 (14:59 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 30 Jan 2019 22:18:53 +0000 (23:18 +0100)
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317

js/ui/main.js

index 6e2122273d14ce5162e8e0b9adc836fa973a9dc1..e827eb9c59ad733b389a7ed7d8654c2f7ef90093 100644 (file)
@@ -127,8 +127,8 @@ function start() {
 
     sessionMode = new SessionMode.SessionMode();
     sessionMode.connect('updated', _sessionUpdated);
-    Gtk.Settings.get_default().connect('notify::gtk-theme-name',
-                                       _loadDefaultStylesheet);
+
+    St.Settings.get().connect('notify::gtk-theme', _loadDefaultStylesheet);
     Gtk.IconTheme.get_default().add_resource_path('/org/gnome/shell/theme/icons');
     _initializeUI();
 
@@ -279,7 +279,7 @@ function _getDefaultStylesheet() {
 
     // Look for a high-contrast variant first when using GTK+'s HighContrast
     // theme
-    if (Gtk.Settings.get_default().gtk_theme_name == 'HighContrast')
+    if (St.Settings.get().gtk_theme == 'HighContrast')
         stylesheet = _getStylesheet(name.replace('.css', '-high-contrast.css'));
 
     if (stylesheet == null)